package com.prompt;

import java.util.HashMap;

public class GlobalState {

	private static GlobalState instance = new GlobalState();
	HashMap<String , String> endMap = new HashMap<String , String>(); 
	
	public boolean isALarm = false;

	public boolean getIsALarm() {
		return isALarm;
	}

	public void setIsALarm(boolean isALarm) {
		this.isALarm = isALarm;
	}
	
	public static GlobalState getInstance() {
		return instance;
	}
	
	public void addEnd(String today){
		endMap.put(today, "1");
	}
	
	public void addAgain(String today){
		endMap.put(today, "0");
	}
	
	public boolean isEnd(String today){
		boolean result = false;
		if(endMap.get(today) != null && endMap.get(today).equals("1")){
			result = true;
		}
		return result;
	}
}
